package com.ruoyi.mall.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.BizWaresMapper;
import com.ruoyi.mall.domain.BizWares;
import com.ruoyi.mall.service.IBizWaresService;

/**
 * 商品列表Service业务层处理
 * 
 * @author WeiHuan.Li
 * @date 2024-04-29
 */
@Service
public class BizWaresServiceImpl implements IBizWaresService 
{
    @Autowired
    private BizWaresMapper bizWaresMapper;

    /**
     * 查询商品列表
     * 
     * @param waresId 商品列表主键
     * @return 商品列表
     */
    @Override
    public BizWares selectBizWaresByWaresId(Long waresId)
    {
        return bizWaresMapper.selectBizWaresByWaresId(waresId);
    }

    /**
     * 查询商品列表列表
     * 
     * @param bizWares 商品列表
     * @return 商品列表
     */
    @Override
    public List<BizWares> selectBizWaresList(BizWares bizWares)
    {
        return bizWaresMapper.selectBizWaresList(bizWares);
    }

    /**
     * 新增商品列表
     * 
     * @param bizWares 商品列表
     * @return 结果
     */
    @Override
    public int insertBizWares(BizWares bizWares)
    {
        bizWares.setCreateTime(DateUtils.getNowDate());
        return bizWaresMapper.insertBizWares(bizWares);
    }

    /**
     * 修改商品列表
     * 
     * @param bizWares 商品列表
     * @return 结果
     */
    @Override
    public int updateBizWares(BizWares bizWares)
    {
        bizWares.setUpdateTime(DateUtils.getNowDate());
        return bizWaresMapper.updateBizWares(bizWares);
    }

    /**
     * 批量删除商品列表
     * 
     * @param waresIds 需要删除的商品列表主键
     * @return 结果
     */
    @Override
    public int deleteBizWaresByWaresIds(Long[] waresIds)
    {
        return bizWaresMapper.deleteBizWaresByWaresIds(waresIds);
    }

    /**
     * 删除商品列表信息
     * 
     * @param waresId 商品列表主键
     * @return 结果
     */
    @Override
    public int deleteBizWaresByWaresId(Long waresId)
    {
        return bizWaresMapper.deleteBizWaresByWaresId(waresId);
    }
}
